<?python
from onlineapidoc.model import (space_status_codes, rls_encoding)
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'../master.kid'">

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>USDN - Generating CHM for ${space.name}</title>
</head>

<body>  
<h2 py:content="space.name">Name</h2>
<p />
<div>
<form id="form_space_chm" action="/space/space_chm_commit" method="post">
<table>
<tr>
<td width="120"><b>CHM File Name</b></td>
<td><input type="text" name="filename" size="50" value="$space.name" /></td>
</tr>
<tr>
<td><b>Default Page</b></td>
<td>
<select py:if="space.rls_default_page" name="main_page_id">
<option py:for="page in space.root_normal_pages" value="$page.id" selected="${(None, '')[page.id == space.rls_default_page.id]}">
${page.name}
</option>
</select>
<select py:if="not space.rls_default_page" name="main_page_id">
<option py:for="page in space.root_normal_pages" value="$page.id">
${page.name}
</option>
</select>
</td>
</tr>
<tr>
<td><b>Encoding</b></td>
<td>
<select name="rls_encode">
<option py:for="codec in rls_encoding" value="$codec" selected="${(None, '')[space.rls_encode == codec]}">
${codec}
</option>
</select>
</td>
</tr>
<tr>
<td><b>Rebuild All</b></td>
<td>
<input type="checkbox" name="rebuild_all" value="1" id="checkbox"/>
</td>
</tr>
<tr>
<td><b>Ext Info</b></td>
<td>
<input type="checkbox" name="ext_info" value="1" id="checkbox" checked="checked"/>
</td>
</tr>
</table>
<input name="space_id" type="hidden" value="$space.id" />
<a href="#" onclick="submit('form_space_chm'); return false;">Generate</a>
<a href="#" onclick="history.back();">Back</a>
</form>
</div>
</body>

</html>
